<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions">

<ui:composition template="/WEB-INF/templates/template.xhtml">
	
	<ui:define name="conteudo">
	  <h:outputStylesheet name="Estoque.css" library="css"/> 
	 <h:outputScript name="evento.js" library="js"/>  
	     <br/>
       
                <p:menubar>
                     <p:menuitem value="Adicionar toner" icon="ui-icon-plus"  url="/free/adiciona7556.xhtml" />
                     <p:menuitem value="Adicionar foto" icon="ui-icon-plus"  url="/free/fotoadiciona7556.xhtml" style="position: relative;left: 15px" />
                     <p:menuitem value="Voltar" icon="ui-icon-arrowreturn-1-w" url="/free/inicio.xhtml" style="position: relative;left: 30px"/>
                     <p:menuitem value="Toner em uso" icon="ui-icon-document" url="/free/7556emuso.xhtml" style="position: relative;left: 45px"/>
                     <p:menuitem value="Toner usado" icon="ui-icon-trash" url="/free/7556usado.xhtml" style="position: relative;left: 60px"/>
                     <p:menuitem value="Foto novo" icon="ui-icon-document" url="/free/foto7556novo.xhtml" style="position: relative;left: 75px"/>
                     <p:menuitem value="Foto em uso" icon="ui-icon-document" url="/free/foto7556uso.xhtml" style="position: relative;left: 90px"/>
                     <p:menuitem value="Foto usado" icon="ui-icon-trash" url="/free/foto7556usado.xhtml" style="position: relative;left: 105px"/>
                     <p:menuitem value="Logout" icon="ui-icon-extlink" url="Xerox/j_spring_security_logout" style="position: relative; left: 180px"/>
                </p:menubar>
       
            <h:form id="form">
                
                <p:graphicImage url="/resources/7556.jpg"/>
                <p:messages id="alerta" severity="warn" rendered="#{wc7556Bean.testaPreto()}" showDetail="true" closable="true" for="preto">
                	#{wc7556Bean.alertaPreto()}
                </p:messages>
                
                <p:growl id="msg"/>
                <br/><br/>
               
                <p:dataTable id="dataTable1" var="print" value="#{wc7556Bean.getList7556Preto()}" styleClass="order-table" style="position: relative; left:22%;
                                                width: 60%" rowStyleClass="dt1">
                                               
                        <f:facet name="header">
                                Lista de Toner Preto Novo
                        </f:facet>
                        
                        <!--<p:column headerText="ID" style="font-size:15px;">
                        	<h:outputText value="#{print.tId}"/>
                        </p:column>-->
                       
                        <p:column headerText="MODELO" style="font-size:15px;">
                                <h:outputText value="#{print.modelo}" />
                        </p:column>
                       
                        <p:column headerText="PATRIMONIO" style="font-size:15px;">
                                <h:outputText value="#{print.patrimonio}" style="text-transform: uppercase"/>
                        </p:column>
                       
                        <p:column headerText="SERIE" style="font-size:15px;">
                                <h:outputText value="#{print.serie}" style="text-transform: uppercase"/>
                        </p:column>
                        
                        <p:column headerText="COR" style="font-size:15px;">
                        		<h:outputText value="#{print.cor}" style="text-transform: uppercase"/>
                        </p:column>
                       
                        <p:column headerText="SITUAÇÃO" style="font-size:15px;">
                                <h:outputText value="#{print.situacao}" style="text-transform: uppercase"/>
                        </p:column>
                       
                        <p:column headerText="AÇÕES" style="font-size:15px;">
                               
                                <p:commandButton icon="ui-icon-pencil" update=":form:edit" oncomplete="editWidget1.show()" title="editar">
                                	<f:setPropertyActionListener target="#{wc7556Bean.toner}" value="#{print}"/>
                                </p:commandButton>
                                
                                <p:commandButton icon="ui-icon-trash" update=":form:removeDialog" oncomplete="removeWidget1.show()" title="excluir">
                                	<f:setPropertyActionListener target="#{wc7556Bean.toner}" value="#{print}"/>
                                </p:commandButton>
                        </p:column>
                       
                        <f:facet name="footer">
                                Total de toner preto: #{fn:length(wc7556Bean.getList7556Preto())} 
                        </f:facet>
                </p:dataTable>
                
                <p:dialog header="Editar Toner" widgetVar="editWidget1"  resizable="false" modal="true" showEffect="explode" hideEffect="drop">
                	<p:ajax event="close" listener="#{wc7556Bean.limpar}"/>
                	<h:panelGrid id="edit" columns="2" cellpadding="4" style="margin:0 auto;">
                		
                				<p:outputLabel value="PATRIMONIO:" for="patrimonio1"/>
                                <p:inputText id="patrimonio1" style="text-transform: uppercase" value="#{wc7556Bean.toner.patrimonio}"/>
                       
                                <p:outputLabel value="SERIE: " for="serie1"/>
                                <p:inputText id="serie1" style="text-transform: uppercase" value="#{wc7556Bean.toner.serie}"/>
                                
                                <p:outputLabel value="COR: " for="cor1"/>
                                <p:selectOneMenu id="cor1" value="#{wc7556Bean.toner.cor}">
                                	<f:selectItem itemLabel="PRETO" itemValue="PRETO"/>
                                	<f:selectItem itemLabel="CIANO" itemValue="CIANO"/>
                                	<f:selectItem itemLabel="AMARELO" itemValue="AMARELO"/>
                                	<f:selectItem itemLabel="MAGENTA" itemValue="MAGENTA"/>
                                </p:selectOneMenu>
                                
                                <p:outputLabel value="SITUAÇÃO: " for="situacao1"/>
                                <p:selectOneMenu id="situacao1" value="#{wc7556Bean.toner.situacao}">
                                	<f:selectItem itemLabel="NOVO" itemValue="NOVO"/>
                                	<f:selectItem itemLabel="EM USO" itemValue="EM USO"/>
                                	<f:selectItem itemLabel="USADO" itemValue="USADO"/>
                                </p:selectOneMenu>
                                
                                <p:commandButton value="Editar" icon="ui-icon-check" action="#{wc7556Bean.editar7556}" oncomplete="editWidget1.hide();load()"  update="dataTable1, msg, alerta"/>
                                <p:commandButton value="cancelar" icon="ui-icon-cancel" action="#{wc7556Bean.limpar}" oncomplete="editWidget1.hide()"/>
                	</h:panelGrid>
                </p:dialog>
                
                <p:confirmDialog id="removeDialog" widgetVar="removeWidget1" header="Remover toner" closable="false"
                					message="Deseja realmente excluir o toner #{wc7556Bean.toner.patrimonio}?" severity="alert" showEffect="explode" hideEffect="drop">
                					
                	<p:commandButton value="sim" icon="ui-icon-check" actionListener="#{wc7556Bean.remover7556}" oncomplete="removeWidget1.hide()" update="dataTable1, msg, alerta" />	
                					
                	<p:commandButton value="cancelar" icon="ui-icon-cancel" action="#{wc7556Bean.limpar}" oncomplete="removeWidget1.hide()" />
    			</p:confirmDialog>
            <br/>
            </h:form>
            <h:form id="form2">
            	<p:messages id="alertac" severity="warn" rendered="#{wc7556Bean.testaCiano()}" showDetail="true" closable="true" for="ciano">
                	#{wc7556Bean.alertaCiano()}
                </p:messages>
                <br/><br/>
                <p:growl id="msg2"/>
                <p:dataTable id="dataTable2" var="print" value="#{wc7556Bean.getList7556Ciano()}" styleClass="order-table" style="position: relative; left:22%;
                                                width: 60%" rowStyleClass="dt2">
                                               
                        <f:facet name="header">
                                Lista de Toner Ciano Novo
                        </f:facet>
                        
                        <!--<p:column headerText="ID" style="font-size:15px;">
                        	<h:outputText value="#{print.tId}"/>
                        </p:column>-->
                       
                        <p:column headerText="MODELO" style="font-size:15px;">
                                <h:outputText value="#{print.modelo}" />
                        </p:column>
                       
                        <p:column headerText="PATRIMONIO" style="font-size:15px;">
                                <h:outputText value="#{print.patrimonio}" style="text-transform: uppercase"/>
                        </p:column>
                       
                        <p:column headerText="SERIE" style="font-size:15px;">
                                <h:outputText value="#{print.serie}" style="text-transform: uppercase"/>
                        </p:column>
                        
                        <p:column headerText="COR" style="font-size:15px;">
                        		<h:outputText value="#{print.cor}" style="text-transform: uppercase"/>
                        </p:column>
                       
                        <p:column headerText="SITUAÇÃO" style="font-size:15px;">
                                <h:outputText value="#{print.situacao}" style="text-transform: uppercase"/>
                        </p:column>
                       
                        <p:column headerText="AÇÕES" style="font-size:15px;">
                               
                                <p:commandButton icon="ui-icon-pencil" update=":form2:edit1" oncomplete="editWidget2.show()" title="editar">
                                	<f:setPropertyActionListener target="#{wc7556Bean.toner}" value="#{print}"/>
                                </p:commandButton>
                                
                                <p:commandButton icon="ui-icon-trash" update=":form2:removeDialog1" oncomplete="removeWidget2.show()" title="excluir">
                                	<f:setPropertyActionListener target="#{wc7556Bean.toner}" value="#{print}"/>
                                </p:commandButton>
                        </p:column>
                       
                        <f:facet name="footer">
                                Total de toner ciano: #{fn:length(wc7556Bean.getList7556Ciano())} 
                        </f:facet>
                </p:dataTable>
                
                <p:dialog header="Editar Toner" widgetVar="editWidget2" resizable="false" modal="true" showEffect="explode" hideEffect="drop">
                <p:ajax event="close" listener="#{wc7556Bean.limpar}"/>
                	<h:panelGrid id="edit1" columns="2" cellpadding="4" style="margin:0 auto;">
                		
                				<p:outputLabel value="PATRIMONIO:" for="patrimonio2"/>
                                <p:inputText id="patrimonio2" style="text-transform: uppercase" value="#{wc7556Bean.toner.patrimonio}"/>
                       
                                <p:outputLabel value="SERIE: " for="serie2"/>
                                <p:inputText id="serie2" style="text-transform: uppercase" value="#{wc7556Bean.toner.serie}"/>
                                
                                <p:outputLabel value="COR: " for="cor2"/>
                                <p:selectOneMenu id="cor2" value="#{wc7556Bean.toner.cor}">
                                	<f:selectItem itemLabel="PRETO" itemValue="PRETO"/>
                                	<f:selectItem itemLabel="CIANO" itemValue="CIANO"/>
                                	<f:selectItem itemLabel="AMARELO" itemValue="AMARELO"/>
                                	<f:selectItem itemLabel="MAGENTA" itemValue="MAGENTA"/>
                                </p:selectOneMenu>
                                
                                <p:outputLabel value="Situação: " for="situacao2"/>
                                <p:selectOneMenu id="situacao2" value="#{wc7556Bean.toner.situacao}">
                                	<f:selectItem itemLabel="NOVO" itemValue="NOVO"/>
                                	<f:selectItem itemLabel="EM USO" itemValue="EM USO"/>
                                	<f:selectItem itemLabel="USADO" itemValue="USADO"/>
                                </p:selectOneMenu>
                                
                                <p:commandButton value="Editar" icon="ui-icon-check" action="#{wc7556Bean.editar7556}" oncomplete="editWidget2.hide();load()" update="dataTable2, msg2, alertac"/>
                                <p:commandButton value="cancelar" icon="ui-icon-cancel" action="#{wc7556Bean.limpar}" oncomplete="editWidget2.hide()"/>
                	</h:panelGrid>
                </p:dialog>
                
                <p:confirmDialog id="removeDialog1" widgetVar="removeWidget2" header="Remover toner" closable="false"
                					message="Deseja realmente excluir o toner #{wc7556Bean.toner.patrimonio}?" severity="alert" showEffect="explode" hideEffect="drop">
                					
                	<p:commandButton value="sim" icon="ui-icon-check" actionListener="#{wc7556Bean.remover7556}" oncomplete="removeWidget2.hide()" update="dataTable2, msg2, alertac"/>				
                					
                	<p:commandButton value="cancelar" icon="ui-icon-cancel" action="#{wc7556Bean.limpar}" oncomplete="removeWidget2.hide()" />
    			 </p:confirmDialog>
            <br/>
            </h:form>
            <h:form id="form3">
                <br/><br/>
                 <p:growl id="msg3"/>
                <p:dataTable id="dataTable3" var="print" value="#{wc7556Bean.getList7556Amarelo()}" styleClass="order-table" style="position: relative; left:22%;
                                                width: 60%;" rowStyleClass="dt3">
                                               
                        <f:facet name="header">
                                Lista de Toner Amarelo Novo
                        </f:facet>
                        
                        <!--<p:column headerText="ID" style="font-size:15px;">
                        	<h:outputText value="#{print.tId}"/>
                        </p:column>-->
                       
                        <p:column headerText="MODELO" style="font-size:15px;">
                                <h:outputText value="#{print.modelo}" />
                        </p:column>
                       
                        <p:column headerText="PATRIMONIO" style="font-size:15px;">
                                <h:outputText value="#{print.patrimonio}" style="text-transform: uppercase"/>
                        </p:column>
                       
                        <p:column headerText="SERIE" style="font-size:15px;">
                                <h:outputText value="#{print.serie}" style="text-transform: uppercase"/>
                        </p:column>
                        
                        <p:column headerText="COR" style="font-size:15px;">
                        		<h:outputText value="#{print.cor}" style="text-transform: uppercase"/>
                        </p:column>
                       
                        <p:column headerText="SITUAÇÃO" style="font-size:15px;">
                                <h:outputText value="#{print.situacao}" style="text-transform: uppercase"/>
                        </p:column>
                       
                        <p:column headerText="AÇÕES" style="font-size:15px;">
                               
                                <p:commandButton icon="ui-icon-pencil" update=":form3:edit2" oncomplete="editWidget3.show()" title="editar">
                                	<f:setPropertyActionListener target="#{wc7556Bean.toner}" value="#{print}"/>
                                </p:commandButton>
                                
                                <p:commandButton icon="ui-icon-trash" update=":form3:removeDialog2" oncomplete="removeWidget3.show()" title="excluir">
                                	<f:setPropertyActionListener target="#{wc7556Bean.toner}" value="#{print}"/>
                                </p:commandButton>
                        </p:column>
                       
                        <f:facet name="footer">
                                Total de toner amarelo: #{fn:length(wc7556Bean.getList7556Amarelo())} 
                        </f:facet>
                </p:dataTable>
                
                <p:dialog header="Editar Toner" widgetVar="editWidget3" resizable="false" modal="true" showEffect="explode" hideEffect="drop">
                <p:ajax event="close" listener="#{wc7556Bean.limpar}"/>
                	<h:panelGrid id="edit2" columns="2" cellpadding="4" style="margin:0 auto;">
                		
                				<p:outputLabel value="PATRIMONIO:" for="patrimonio3"/>
                                <p:inputText id="patrimonio3" style="text-transform: uppercase" value="#{wc7556Bean.toner.patrimonio}"/>
                       
                                <p:outputLabel value="SERIE: " for="serie3"/>
                                <p:inputText id="serie3" style="text-transform: uppercase" value="#{wc7556Bean.toner.serie}"/>
                                
                                <p:outputLabel value="COR: " for="cor3"/>
                                <p:selectOneMenu id="cor3" value="#{wc7556Bean.toner.cor}">
                                	<f:selectItem itemLabel="PRETO" itemValue="PRETO"/>
                                	<f:selectItem itemLabel="CIANO" itemValue="CIANO"/>
                                	<f:selectItem itemLabel="AMARELO" itemValue="AMARELO"/>
                                	<f:selectItem itemLabel="MAGENTA" itemValue="MAGENTA"/>
                                </p:selectOneMenu>
                                
                                <p:outputLabel value="Situação: " for="situacao3"/>
                                <p:selectOneMenu id="situacao3" value="#{wc7556Bean.toner.situacao}">
                                	<f:selectItem itemLabel="NOVO" itemValue="NOVO"/>
                                	<f:selectItem itemLabel="EM USO" itemValue="EM USO"/>
                                	<f:selectItem itemLabel="USADO" itemValue="USADO"/>
                                </p:selectOneMenu>
                                
                                <p:commandButton value="Editar" icon="ui-icon-check" action="#{wc7556Bean.editar7556}" oncomplete="editWidget3.hide();load()" update="dataTable3, msg3"/>
                                <p:commandButton value="cancelar" icon="ui-icon-cancel" action="#{wc7556Bean.limpar}" oncomplete="editWidget3.hide()"/>
                	</h:panelGrid>
                </p:dialog>
                
                <p:confirmDialog id="removeDialog2" widgetVar="removeWidget3" header="Remover toner" closable="false"
                					message="Deseja realmente excluir o toner #{wc7556Bean.toner.patrimonio}?" severity="alert" showEffect="explode" hideEffect="drop">
                					
                	<p:commandButton value="sim" icon="ui-icon-check" actionListener="#{wc7556Bean.remover7556}" oncomplete="removeWidget3.hide()" update="dataTable3, msg3"/>				
                					
                	<p:commandButton value="cancelar" icon="ui-icon-cancel" action="#{wc7556Bean.limpar}" oncomplete="removeWidget3.hide()" />
    			</p:confirmDialog>
            <br/>
            </h:form>
            <h:form id="form4">
                <br/><br/>
               	 <p:growl id="msg4"/>
                <p:dataTable id="dataTable4" var="print" value="#{wc7556Bean.getList7556Magenta()}" styleClass="order-table" style="position: relative; left:22%;
                                                width: 60%;" rowStyleClass="dt4">
                                               
                        <f:facet name="header">
                                Lista de Toner Magenta Novo
                        </f:facet>
                        
                        <!--<p:column headerText="ID" style="font-size:15px;">
                        	<h:outputText value="#{print.tId}"/>
                        </p:column>-->
                       
                        <p:column headerText="MODELO" style="font-size:15px;">
                                <h:outputText value="#{print.modelo}" />
                        </p:column>
                       
                        <p:column headerText="PATRIMONIO" style="font-size:15px;">
                                <h:outputText value="#{print.patrimonio}" style="text-transform: uppercase"/>
                        </p:column>
                       
                        <p:column headerText="SERIE" style="font-size:15px;">
                                <h:outputText value="#{print.serie}" style="text-transform: uppercase"/>
                        </p:column>
                        
                        <p:column headerText="COR" style="font-size:15px;">
                        		<h:outputText value="#{print.cor}" style="text-transform: uppercase"/>
                        </p:column>
                       
                        <p:column headerText="SITUAÇÃO" style="font-size:15px;">
                                <h:outputText value="#{print.situacao}" style="text-transform: uppercase"/>
                        </p:column>
                       
                        <p:column headerText="AÇÕES" style="font-size:15px;">
                               
                                <p:commandButton icon="ui-icon-pencil" update=":form4:edit3" oncomplete="editWidget4.show()" title="editar">
                                	<f:setPropertyActionListener target="#{wc7556Bean.toner}" value="#{print}"/>
                                </p:commandButton>
                                
                                <p:commandButton icon="ui-icon-trash" update=":form4:removeDialog3" oncomplete="removeWidget4.show()" title="excluir">
                                	<f:setPropertyActionListener target="#{wc7556Bean.toner}" value="#{print}"/>
                                </p:commandButton>
                        </p:column>
                       
                        <f:facet name="footer">
                                Total de toner magenta: #{fn:length(wc7556Bean.getList7556Magenta())} 
                        </f:facet>
                </p:dataTable>
                
                <p:dialog header="Editar Toner" widgetVar="editWidget4" resizable="false" modal="true" showEffect="explode" hideEffect="drop">
                <p:ajax event="close" listener="#{wc7556Bean.limpar}"/>
                	<h:panelGrid id="edit3" columns="2" cellpadding="4" style="margin:0 auto;">
                		
                				<p:outputLabel value="PATRIMONIO:" for="patrimonio4"/>
                                <p:inputText id="patrimonio4" style="text-transform: uppercase" value="#{wc7556Bean.toner.patrimonio}"/>
                       
                                <p:outputLabel value="SERIE: " for="serie4"/>
                                <p:inputText id="serie4" style="text-transform: uppercase" value="#{wc7556Bean.toner.serie}"/>
                                
                                <p:outputLabel value="COR: " for="cor4"/>
                                <p:selectOneMenu id="cor4" value="#{wc7556Bean.toner.cor}">
                                	<f:selectItem itemLabel="PRETO" itemValue="PRETO"/>
                                	<f:selectItem itemLabel="CIANO" itemValue="CIANO"/>
                                	<f:selectItem itemLabel="AMARELO" itemValue="AMARELO"/>
                                	<f:selectItem itemLabel="MAGENTA" itemValue="MAGENTA"/>
                                </p:selectOneMenu>
                                
                                <p:outputLabel value="Situação: " for="situacao4"/>
                                <p:selectOneMenu id="situacao4" value="#{wc7556Bean.toner.situacao}">
                                	<f:selectItem itemLabel="NOVO" itemValue="NOVO"/>
                                	<f:selectItem itemLabel="EM USO" itemValue="EM USO"/>
                                	<f:selectItem itemLabel="USADO" itemValue="USADO"/>
                                </p:selectOneMenu>
                                
                                <p:commandButton value="Editar" icon="ui-icon-check" action="#{wc7556Bean.editar7556}" oncomplete="editWidget4.hide();load()" update="dataTable4, msg4"/>
                                <p:commandButton value="cancelar" icon="ui-icon-cancel" action="#{wc7556Bean.limpar}" oncomplete="editWidget4.hide()"/>
                	</h:panelGrid>
                </p:dialog>
                
                <p:confirmDialog id="removeDialog3" widgetVar="removeWidget4" header="Remover toner" closable="false"
                					message="Deseja realmente excluir o toner #{wc7556Bean.toner.patrimonio}?" severity="alert" showEffect="explode" hideEffect="drop">
                					
                	<p:commandButton value="sim" icon="ui-icon-check" actionListener="#{wc7556Bean.remover7556}" oncomplete="removeWidget4.hide()" update="dataTable4, msg4"/>				
                					
                	<p:commandButton value="cancelar" icon="ui-icon-cancel" action="#{wc7556Bean.limpar}" oncomplete="removeWidget4.hide()" />
    
                </p:confirmDialog>
            </h:form>
            <br/>
            <br/>
	</ui:define>
	
</ui:composition>
</html>